<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>修改姓名 - 模切材料小管家</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            --primary-color: #0052d9;
            --primary-light: #266fe8;
            --bg-color-page: #f5f7fa;
            --bg-color-container: #ffffff;
            --border-color: #e7e7e7;
            --border-color-light: #f0f0f0;
            --border-radius-medium: 6px;
            --text-primary: #1a1a1a;
            --text-secondary: #4e5969;
            --text-placeholder: #86909c;
            --shadow-1: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
            --space-2: 8px;
            --space-3: 12px;
            --space-4: 16px;
            --space-5: 20px;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        }
        
        body {
            background-color: var(--bg-color-page);
            color: var(--text-primary);
            font-size: 14px;
            line-height: 1.5;
        }
        
        .container {
            max-width: 480px;
            margin: 0 auto;
            background: var(--bg-color-container);
            min-height: 100vh;
        }
        
        .header {
            background: var(--primary-color);
            color: white;
            padding: var(--space-4);
            display: flex;
            align-items: center;
            gap: var(--space-4);
        }
        
        .back-btn {
            font-size: 18px;
            cursor: pointer;
            opacity: 0.9;
            transition: opacity 0.2s ease;
        }
        
        .back-btn:hover {
            opacity: 1;
        }
        
        .page-title {
            font-weight: 500;
            font-size: 16px;
        }
        
        .content {
            padding: var(--space-5);
        }
        
        .form-group {
            margin-bottom: var(--space-5);
        }
        
        .form-label {
            display: block;
            margin-bottom: var(--space-2);
            color: var(--text-primary);
            font-size: 14px;
        }
        
        .form-input {
            width: 100%;
            padding: var(--space-3);
            border: 1px solid var(--border-color);
            border-radius: var(--border-radius-medium);
            font-size: 14px;
            color: var(--text-primary);
            transition: border-color 0.2s ease;
        }
        
        .form-input:focus {
            outline: none;
            border-color: var(--primary-color);
        }
        
        .form-input::placeholder {
            color: var(--text-placeholder);
        }
        
        .submit-btn {
            width: 100%;
            padding: var(--space-3);
            background: var(--primary-color);
            color: white;
            border: none;
            border-radius: var(--border-radius-medium);
            font-size: 16px;
            cursor: pointer;
            margin-top: var(--space-5);
            transition: background-color 0.2s ease;
        }
        
        .submit-btn:hover {
            background: var(--primary-light);
        }
        
        .hint-text {
            font-size: 12px;
            color: var(--text-secondary);
            margin-top: var(--space-2);
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <div class="back-btn" onclick="history.back()">
                <i class="fas fa-arrow-left"></i>
            </div>
            <div class="page-title">修改姓名</div>
        </div>
        
        <div class="content">
            <div class="form-group">
                <label class="form-label">当前姓名</label>
                <input type="text" class="form-input" value="蒋婷" disabled>
            </div>
            
            <div class="form-group">
                <label class="form-label">新姓名</label>
                <input type="text" class="form-input" id="newName" placeholder="请输入新姓名" maxlength="20">
                <div class="hint-text">请输入真实姓名，用于身份认证和交易</div>
            </div>
            
            <button class="submit-btn" onclick="submitName()">确认修改</button>
        </div>
    </div>
    
    <script>
        function submitName() {
            const newName = document.getElementById('newName').value.trim();
            
            if (!newName) {
                alert('请输入新姓名');
                return;
            }
            
            if (newName.length < 2) {
                alert('姓名至少需要2个字符');
                return;
            }
            
            alert('姓名修改成功');
            history.back();
        }
    </script>
</body>
</html>

